use std::mem::drop;
struct CustomSmartPointer {
    data: String,
}
impl Drop for CustomSmartPointer {
    fn drop(&mut self) {
        println!("Dropping CustomSmartPointer with data `{}`!", self.data)
    }
}
fn main() {
    let mut c = CustomSmartPointer {
        data: String::from("some data"),
    };
    println!("c created");
    drop(c);
    println!("CustomSmartPointer dropped before the end of main.");
    // let c = CustomSmartPointer {
    //     data: String::from("my stuff"),
    // };
    // let d = CustomSmartPointer {
    //     data: String::from("other stuff"),
    // };
    // println!("CustomSmartPointers created.")
}
